package com.leetcode;

import java.util.Random;
public class Test_2 {
    public static void main(String[] args) {
        double sum=0;//统计总分
        Random random = new Random();
        int k=30;//班级人数
        double avg=0;//平均分
        while(k>0){
            sum+=random.nextInt(100)*1.0+1;
            k--;
        }
        k=30;
        avg=sum/k;
        System.out.println("平均分为"+avg);
    }
}
